home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWString / Include / SLTxtRun.xh < prev    next >
Encoding:
Text File  |  1996-08-16  |  17.5 KB  |  735 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SLTxtRun.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  * 
  13.  *     File:        SLTxtRun.idl
  14.  * 
  15.  *     Contains:    Interface for OTextRunReader and OTextRunWriter classes
  16.  * 
  17.  *     Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  18.  * 
  19.  * 
  20.  */
  21.  
  22.  
  23. #ifndef SOM_FW_OTextRunReader_xh
  24. #define SOM_FW_OTextRunReader_xh
  25.  
  26. class FW_OTextRunReader;
  27.  
  28. #define FW_OTextRunReader_MajorVersion 1
  29. #define FW_OTextRunReader_MinorVersion 0
  30.  
  31. /*
  32.  * Passthru lines: File: "C.xh", "before"
  33.  */
  34.  
  35.  
  36. /* C++ SOM defs */
  37. #include <somcls.xh>
  38. #include <somcm.xh>
  39.  
  40. /* C++ parent defs */
  41. #ifndef SOM_SOMObject_xh
  42. #include <somobj.xh>
  43. #endif
  44.  
  45. #ifndef FW_OTextRunReader_API
  46. #define FW_OTextRunReader_API
  47. /*
  48.  * -- The Class API
  49.  */
  50.  
  51. /*
  52.  * Start of user-defined types:
  53.  */
  54. class SOMClass;
  55. class SOMObject;
  56. class FW_OTextRunReader;
  57. class FW_OTextRunWriter;
  58. class FW_OMemoryRunReader;
  59. class FW_OMemoryRunWriter;
  60.  
  61. /*
  62.  * End of user-defined types.
  63.  */
  64.  
  65. #ifdef OLDIBMSOMAPISUPPORT
  66. #define FW_OTextRunReaderCClassData FW_OTextRunReaderClassData
  67. #define FW_OTextRunReaderNewClass(major,minor) somNewVersionedClassReference(FW_OTextRunReader,major,minor)
  68. #endif
  69.  
  70. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  71. #define FW_OTextRunReaderMetaClass SOMClass
  72.  
  73. #if PRAGMA_ALIGN_SUPPORTED
  74. #  pragma options align=power
  75. #endif
  76.  
  77. /* The API to the FW_OTextRunReader class object, and the methods it introduces. */
  78. SOMEXTERN struct FW_OTextRunReaderClassDataStructure {
  79. #ifdef OLDIBMSOMAPISUPPORT
  80.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  81. #else
  82.     long zero;
  83. #endif
  84.     somStaticClassInfo *sci;
  85.     somDToken        instanceDataToken;
  86.     long reserved [3];
  87.     somMToken GetCurrentRun;
  88.     somMToken NextRun;
  89.     somMToken PreviousRun;
  90.     somMToken GetTotalLength;
  91. } SOMDLINK FW_OTextRunReaderClassData;
  92.  
  93. #if PRAGMA_ALIGN_SUPPORTED
  94. #  pragma options align=reset
  95. #endif
  96.  
  97. #if !defined(FW_OTextRunReader_Class_Source) && !defined(SOM_Module_sltxtrun_Source)
  98. #if PRAGMA_IMPORT_SUPPORTED
  99. #pragma import list FW_OTextRunReaderClassData
  100. #endif
  101. #endif
  102.  
  103.  
  104. /*
  105.  * -- Typedefs and inline method declarations for left path inherited methods
  106.  * -- are omitted because this compilation had -museinheritedmethods in effect
  107.  */
  108.  
  109.  
  110. /*
  111.  * -- Typedefs for FW_OTextRunReader Method Procedures
  112.  */
  113. SOMEXTERN {
  114. typedef corbastring   (* SOMLINK somTD_FW_OTextRunReader_GetCurrentRun)(FW_OTextRunReader *somSelf, Environment *ev,
  115.         FW_ByteCount* length,
  116.         FW_Locale* locale);
  117. typedef boolean   (* SOMLINK somTD_FW_OTextRunReader_NextRun)(FW_OTextRunReader *somSelf, Environment *ev);
  118. typedef boolean   (* SOMLINK somTD_FW_OTextRunReader_PreviousRun)(FW_OTextRunReader *somSelf, Environment *ev);
  119. typedef FW_ByteCount   (* SOMLINK somTD_FW_OTextRunReader_GetTotalLength)(FW_OTextRunReader *somSelf, Environment *ev);
  120. }
  121.  
  122. #endif /* FW_OTextRunReader_API */
  123.  
  124.  
  125. /*
  126.  * -- This emitter treats Method Tokens as Thunks by default.
  127.  * -- Use the sc modifier "nothunks" to change this default
  128.  */
  129. #undef somresolve_
  130. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  131.  
  132. /*
  133.  * -- The C++ Wrapper Class for FW_OTextRunReader
  134.  */
  135. class FW_OTextRunReader : public SOMObject
  136. {
  137. public:
  138.  
  139. // FW_OTextRunReader::new registers use of the class object, and then uses somNew
  140. // to allocate memory and load the object method table pointer. 
  141. void *operator new(size_t size)
  142. {
  143.     SOM_IgnoreWarning(size);
  144.     // Allocate memory using the default allocator for FW_OTextRunReader, and
  145.     // clear mem & set method table pointer, call basic initialization
  146. #ifdef SOMCHKNULL
  147.     void * __somResult = (void *)
  148.       somNewObject(FW_OTextRunReader);
  149.     SOMCHKNULL(__somResult);
  150.     return __somResult;
  151. #else
  152.     return (void*) somNewObject(FW_OTextRunReader);
  153. #endif
  154. }
  155.  
  156. // FW_OTextRunReader::delete uses the default deallocator for the object's class.
  157. void operator delete(void * obj)
  158. {
  159.     if (obj) {
  160.         SOM_Resolve(obj,SOMObject,somFree)
  161.            ( (SOMObject*) obj );
  162.     }
  163. }
  164.  
  165. /* method: GetCurrentRun */
  166. corbastring   GetCurrentRun(Environment *ev,
  167.         FW_ByteCount* length,
  168.         FW_Locale* locale)
  169. {
  170.    #ifdef SOMCHKEXCEPT
  171.    corbastring __somResult = 
  172.       SOM_ResolveD(this,FW_OTextRunReader,FW_OTextRunReader,GetCurrentRun)
  173.     (this,ev,length,locale);
  174.       SOMCHKEXCEPT;
  175.    return __somResult;
  176. #else
  177.    return SOM_ResolveD(this,FW_OTextRunReader,FW_OTextRunReader,GetCurrentRun)
  178.     (this,ev,length,locale);
  179. #endif
  180. }
  181.  
  182. /* method: NextRun */
  183. boolean   NextRun(Environment *ev)
  184. {
  185.    #ifdef SOMCHKEXCEPT
  186.    boolean __somResult = 
  187.       SOM_ResolveD(this,FW_OTextRunReader,FW_OTextRunReader,NextRun)
  188.     (this,ev);
  189.       SOMCHKEXCEPT;
  190.    return __somResult;
  191. #else
  192.    return SOM_ResolveD(this,FW_OTextRunReader,FW_OTextRunReader,NextRun)
  193.     (this,ev);
  194. #endif
  195. }
  196.  
  197. /* method: PreviousRun */
  198. boolean   PreviousRun(Environment *ev)
  199. {
  200.    #ifdef SOMCHKEXCEPT
  201.    boolean __somResult = 
  202.       SOM_ResolveD(this,FW_OTextRunReader,FW_OTextRunReader,PreviousRun)
  203.     (this,ev);
  204.       SOMCHKEXCEPT;
  205.    return __somResult;
  206. #else
  207.    return SOM_ResolveD(this,FW_OTextRunReader,FW_OTextRunReader,PreviousRun)
  208.     (this,ev);
  209. #endif
  210. }
  211.  
  212. /* method: GetTotalLength */
  213. FW_ByteCount   GetTotalLength(Environment *ev)
  214. {
  215.    #ifdef SOMCHKEXCEPT
  216.    FW_ByteCount __somResult = 
  217.       SOM_ResolveD(this,FW_OTextRunReader,FW_OTextRunReader,GetTotalLength)
  218.     (this,ev);
  219.       SOMCHKEXCEPT;
  220.    return __somResult;
  221. #else
  222.    return SOM_ResolveD(this,FW_OTextRunReader,FW_OTextRunReader,GetTotalLength)
  223.     (this,ev);
  224. #endif
  225. }
  226.  
  227. };   /* FW_OTextRunReader */
  228.  
  229.  
  230.  
  231. #endif       /* SOM_FW_OTextRunReader_xh */
  232.  
  233. #ifndef SOM_FW_OTextRunWriter_xh
  234. #define SOM_FW_OTextRunWriter_xh
  235.  
  236. class FW_OTextRunWriter;
  237.  
  238. #define FW_OTextRunWriter_MajorVersion 1
  239. #define FW_OTextRunWriter_MinorVersion 0
  240.  
  241. /*
  242.  * Passthru lines: File: "C.xh", "before"
  243.  */
  244.  
  245.  
  246. /* C++ SOM defs */
  247. #include <somcls.xh>
  248. #include <somcm.xh>
  249.  
  250. /* C++ parent defs */
  251. #ifndef SOM_SOMObject_xh
  252. #include <somobj.xh>
  253. #endif
  254.  
  255. #ifndef FW_OTextRunWriter_API
  256. #define FW_OTextRunWriter_API
  257. /*
  258.  * -- The Class API
  259.  */
  260.  
  261. /*
  262.  * Start of user-defined types:
  263.  */
  264.  
  265. /*
  266.  * End of user-defined types.
  267.  */
  268.  
  269. #ifdef OLDIBMSOMAPISUPPORT
  270. #define FW_OTextRunWriterCClassData FW_OTextRunWriterClassData
  271. #define FW_OTextRunWriterNewClass(major,minor) somNewVersionedClassReference(FW_OTextRunWriter,major,minor)
  272. #endif
  273.  
  274. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  275. #define FW_OTextRunWriterMetaClass SOMClass
  276.  
  277. #if PRAGMA_ALIGN_SUPPORTED
  278. #  pragma options align=power
  279. #endif
  280.  
  281. /* The API to the FW_OTextRunWriter class object, and the methods it introduces. */
  282. SOMEXTERN struct FW_OTextRunWriterClassDataStructure {
  283. #ifdef OLDIBMSOMAPISUPPORT
  284.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  285. #else
  286.     long zero;
  287. #endif
  288.     somStaticClassInfo *sci;
  289.     somDToken        instanceDataToken;
  290.     long reserved [3];
  291.     somMToken GetCurrentRun;
  292.     somMToken FlushRun;
  293.     somMToken NewRun;
  294. } SOMDLINK FW_OTextRunWriterClassData;
  295.  
  296. #if PRAGMA_ALIGN_SUPPORTED
  297. #  pragma options align=reset
  298. #endif
  299.  
  300. #if !defined(FW_OTextRunWriter_Class_Source) && !defined(SOM_Module_sltxtrun_Source)
  301. #if PRAGMA_IMPORT_SUPPORTED
  302. #pragma import list FW_OTextRunWriterClassData
  303. #endif
  304. #endif
  305.  
  306.  
  307. /*
  308.  * -- Typedefs and inline method declarations for left path inherited methods
  309.  * -- are omitted because this compilation had -museinheritedmethods in effect
  310.  */
  311.  
  312.  
  313. /*
  314.  * -- Typedefs for FW_OTextRunWriter Method Procedures
  315.  */
  316. SOMEXTERN {
  317. typedef corbastring   (* SOMLINK somTD_FW_OTextRunWriter_GetCurrentRun)(FW_OTextRunWriter *somSelf, Environment *ev,
  318.         FW_ByteCount* length);
  319. typedef void   (* SOMLINK somTD_FW_OTextRunWriter_FlushRun)(FW_OTextRunWriter *somSelf, Environment *ev,
  320.         corbastring buffer,
  321.         FW_ByteCount bytesToFlush);
  322. typedef boolean   (* SOMLINK somTD_FW_OTextRunWriter_NewRun)(FW_OTextRunWriter *somSelf, Environment *ev,
  323.         FW_Locale* locale);
  324. }
  325.  
  326. #endif /* FW_OTextRunWriter_API */
  327.  
  328.  
  329. /*
  330.  * -- This emitter treats Method Tokens as Thunks by default.
  331.  * -- Use the sc modifier "nothunks" to change this default
  332.  */
  333. #undef somresolve_
  334. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  335.  
  336. /*
  337.  * -- The C++ Wrapper Class for FW_OTextRunWriter
  338.  */
  339. class FW_OTextRunWriter : public SOMObject
  340. {
  341. public:
  342.  
  343. // FW_OTextRunWriter::new registers use of the class object, and then uses somNew
  344. // to allocate memory and load the object method table pointer. 
  345. void *operator new(size_t size)
  346. {
  347.     SOM_IgnoreWarning(size);
  348.     // Allocate memory using the default allocator for FW_OTextRunWriter, and
  349.     // clear mem & set method table pointer, call basic initialization
  350. #ifdef SOMCHKNULL
  351.     void * __somResult = (void *)
  352.       somNewObject(FW_OTextRunWriter);
  353.     SOMCHKNULL(__somResult);
  354.     return __somResult;
  355. #else
  356.     return (void*) somNewObject(FW_OTextRunWriter);
  357. #endif
  358. }
  359.  
  360. // FW_OTextRunWriter::delete uses the default deallocator for the object's class.
  361. void operator delete(void * obj)
  362. {
  363.     if (obj) {
  364.         SOM_Resolve(obj,SOMObject,somFree)
  365.            ( (SOMObject*) obj );
  366.     }
  367. }
  368.  
  369. /* method: GetCurrentRun */
  370. corbastring   GetCurrentRun(Environment *ev,
  371.         FW_ByteCount* length)
  372. {
  373.    #ifdef SOMCHKEXCEPT
  374.    corbastring __somResult = 
  375.       SOM_ResolveD(this,FW_OTextRunWriter,FW_OTextRunWriter,GetCurrentRun)
  376.     (this,ev,length);
  377.       SOMCHKEXCEPT;
  378.    return __somResult;
  379. #else
  380.    return SOM_ResolveD(this,FW_OTextRunWriter,FW_OTextRunWriter,GetCurrentRun)
  381.     (this,ev,length);
  382. #endif
  383. }
  384.  
  385. /* method: FlushRun */
  386. void   FlushRun(Environment *ev,
  387.         corbastring buffer,
  388.         FW_ByteCount bytesToFlush)
  389. {
  390.    SOM_ResolveD(this,FW_OTextRunWriter,FW_OTextRunWriter,FlushRun)
  391.     (this,ev,buffer,bytesToFlush);
  392. #ifdef SOMCHKEXCEPT
  393.       SOMCHKEXCEPT;
  394. #endif
  395. }
  396.  
  397. /* method: NewRun */
  398. boolean   NewRun(Environment *ev,
  399.         FW_Locale* locale)
  400. {
  401.    #ifdef SOMCHKEXCEPT
  402.    boolean __somResult = 
  403.       SOM_ResolveD(this,FW_OTextRunWriter,FW_OTextRunWriter,NewRun)
  404.     (this,ev,locale);
  405.       SOMCHKEXCEPT;
  406.    return __somResult;
  407. #else
  408.    return SOM_ResolveD(this,FW_OTextRunWriter,FW_OTextRunWriter,NewRun)
  409.     (this,ev,locale);
  410. #endif
  411. }
  412.  
  413. };   /* FW_OTextRunWriter */
  414.  
  415.  
  416.  
  417. #endif       /* SOM_FW_OTextRunWriter_xh */
  418.  
  419. #ifndef SOM_FW_OMemoryRunReader_xh
  420. #define SOM_FW_OMemoryRunReader_xh
  421.  
  422. class FW_OMemoryRunReader;
  423.  
  424. #define FW_OMemoryRunReader_MajorVersion 1
  425. #define FW_OMemoryRunReader_MinorVersion 0
  426.  
  427. /*
  428.  * Passthru lines: File: "C.xh", "before"
  429.  */
  430.  
  431.  
  432. /* C++ SOM defs */
  433. #include <somcls.xh>
  434. #include <somcm.xh>
  435.  
  436. /* C++ parent defs */
  437. #ifndef SOM_FW_OTextRunReader_xh
  438. #include <SLTxtRun.xh>
  439. #endif
  440.  
  441. #ifndef FW_OMemoryRunReader_API
  442. #define FW_OMemoryRunReader_API
  443. /*
  444.  * -- The Class API
  445.  */
  446.  
  447. /*
  448.  * Start of user-defined types:
  449.  */
  450.  
  451. /*
  452.  * End of user-defined types.
  453.  */
  454.  
  455. #ifdef OLDIBMSOMAPISUPPORT
  456. #define FW_OMemoryRunReaderCClassData FW_OMemoryRunReaderClassData
  457. #define FW_OMemoryRunReaderNewClass(major,minor) somNewVersionedClassReference(FW_OMemoryRunReader,major,minor)
  458. #endif
  459.  
  460. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  461. #define FW_OMemoryRunReaderMetaClass SOMClass
  462.  
  463. #if PRAGMA_ALIGN_SUPPORTED
  464. #  pragma options align=power
  465. #endif
  466.  
  467. /* The API to the FW_OMemoryRunReader class object, and the methods it introduces. */
  468. SOMEXTERN struct FW_OMemoryRunReaderClassDataStructure {
  469. #ifdef OLDIBMSOMAPISUPPORT
  470.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  471. #else
  472.     long zero;
  473. #endif
  474.     somStaticClassInfo *sci;
  475.     somDToken        instanceDataToken;
  476.     long reserved [3];
  477.     somMToken somInit;
  478.     somMToken somUninit;
  479.     somMToken GetCurrentRun;
  480.     somMToken NextRun;
  481.     somMToken PreviousRun;
  482.     somMToken GetTotalLength;
  483.     somMToken Initialize;
  484. } SOMDLINK FW_OMemoryRunReaderClassData;
  485.  
  486. #if PRAGMA_ALIGN_SUPPORTED
  487. #  pragma options align=reset
  488. #endif
  489.  
  490. #if !defined(FW_OMemoryRunReader_Class_Source) && !defined(SOM_Module_sltxtrun_Source)
  491. #if PRAGMA_IMPORT_SUPPORTED
  492. #pragma import list FW_OMemoryRunReaderClassData
  493. #endif
  494. #endif
  495.  
  496.  
  497. /*
  498.  * -- Typedefs and inline method declarations for left path inherited methods
  499.  * -- are omitted because this compilation had -museinheritedmethods in effect
  500.  */
  501.  
  502.  
  503. /*
  504.  * -- Typedefs for FW_OMemoryRunReader Method Procedures
  505.  */
  506. SOMEXTERN {
  507. typedef FW_OMemoryRunReader*   (* SOMLINK somTD_FW_OMemoryRunReader_Initialize)(FW_OMemoryRunReader *somSelf, Environment *ev,
  508.         corbastring buffer,
  509.         FW_ByteCount length);
  510. }
  511.  
  512. #endif /* FW_OMemoryRunReader_API */
  513.  
  514.  
  515. /*
  516.  * -- This emitter treats Method Tokens as Thunks by default.
  517.  * -- Use the sc modifier "nothunks" to change this default
  518.  */
  519. #undef somresolve_
  520. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  521.  
  522. /*
  523.  * -- The C++ Wrapper Class for FW_OMemoryRunReader
  524.  */
  525. class FW_OMemoryRunReader : public FW_OTextRunReader
  526. {
  527. public:
  528.  
  529. // FW_OMemoryRunReader::new registers use of the class object, and then uses somNew
  530. // to allocate memory and load the object method table pointer. 
  531. void *operator new(size_t size)
  532. {
  533.     SOM_IgnoreWarning(size);
  534.     // Allocate memory using the default allocator for FW_OMemoryRunReader, and
  535.     // clear mem & set method table pointer, call basic initialization
  536. #ifdef SOMCHKNULL
  537.     void * __somResult = (void *)
  538.       somNewObject(FW_OMemoryRunReader);
  539.     SOMCHKNULL(__somResult);
  540.     return __somResult;
  541. #else
  542.     return (void*) somNewObject(FW_OMemoryRunReader);
  543. #endif
  544. }
  545.  
  546. // FW_OMemoryRunReader::delete uses the default deallocator for the object's class.
  547. void operator delete(void * obj)
  548. {
  549.     if (obj) {
  550.         SOM_Resolve(obj,SOMObject,somFree)
  551.            ( (SOMObject*) obj );
  552.     }
  553. }
  554.  
  555. /* method: Initialize */
  556. FW_OMemoryRunReader*   Initialize(Environment *ev,
  557.         corbastring buffer,
  558.         FW_ByteCount length)
  559. {
  560.    #ifdef SOMCHKEXCEPT
  561.    FW_OMemoryRunReader* __somResult = 
  562.       SOM_ResolveD(this,FW_OMemoryRunReader,FW_OMemoryRunReader,Initialize)
  563.     (this,ev,buffer,length);
  564.       SOMCHKEXCEPT;
  565.    return __somResult;
  566. #else
  567.    return SOM_ResolveD(this,FW_OMemoryRunReader,FW_OMemoryRunReader,Initialize)
  568.     (this,ev,buffer,length);
  569. #endif
  570. }
  571.  
  572. };   /* FW_OMemoryRunReader */
  573.  
  574.  
  575.  
  576. #endif       /* SOM_FW_OMemoryRunReader_xh */
  577.  
  578. #ifndef SOM_FW_OMemoryRunWriter_xh
  579. #define SOM_FW_OMemoryRunWriter_xh
  580.  
  581. class FW_OMemoryRunWriter;
  582.  
  583. #define FW_OMemoryRunWriter_MajorVersion 1
  584. #define FW_OMemoryRunWriter_MinorVersion 0
  585.  
  586. /*
  587.  * Passthru lines: File: "C.xh", "before"
  588.  */
  589.  
  590.  
  591. /* C++ SOM defs */
  592. #include <somcls.xh>
  593. #include <somcm.xh>
  594.  
  595. /* C++ parent defs */
  596. #ifndef SOM_FW_OTextRunWriter_xh
  597. #include <SLTxtRun.xh>
  598. #endif
  599.  
  600. #ifndef FW_OMemoryRunWriter_API
  601. #define FW_OMemoryRunWriter_API
  602. /*
  603.  * -- The Class API
  604.  */
  605.  
  606. /*
  607.  * Start of user-defined types:
  608.  */
  609.  
  610. /*
  611.  * End of user-defined types.
  612.  */
  613.  
  614. #ifdef OLDIBMSOMAPISUPPORT
  615. #define FW_OMemoryRunWriterCClassData FW_OMemoryRunWriterClassData
  616. #define FW_OMemoryRunWriterNewClass(major,minor) somNewVersionedClassReference(FW_OMemoryRunWriter,major,minor)
  617. #endif
  618.  
  619. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  620. #define FW_OMemoryRunWriterMetaClass SOMClass
  621.  
  622. #if PRAGMA_ALIGN_SUPPORTED
  623. #  pragma options align=power
  624. #endif
  625.  
  626. /* The API to the FW_OMemoryRunWriter class object, and the methods it introduces. */
  627. SOMEXTERN struct FW_OMemoryRunWriterClassDataStructure {
  628. #ifdef OLDIBMSOMAPISUPPORT
  629.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  630. #else
  631.     long zero;
  632. #endif
  633.     somStaticClassInfo *sci;
  634.     somDToken        instanceDataToken;
  635.     long reserved [3];
  636.     somMToken somInit;
  637.     somMToken somUninit;
  638.     somMToken GetCurrentRun;
  639.     somMToken FlushRun;
  640.     somMToken NewRun;
  641.     somMToken Initialize;
  642. } SOMDLINK FW_OMemoryRunWriterClassData;
  643.  
  644. #if PRAGMA_ALIGN_SUPPORTED
  645. #  pragma options align=reset
  646. #endif
  647.  
  648. #if !defined(FW_OMemoryRunWriter_Class_Source) && !defined(SOM_Module_sltxtrun_Source)
  649. #if PRAGMA_IMPORT_SUPPORTED
  650. #pragma import list FW_OMemoryRunWriterClassData
  651. #endif
  652. #endif
  653.  
  654.  
  655. /*
  656.  * -- Typedefs and inline method declarations for left path inherited methods
  657.  * -- are omitted because this compilation had -museinheritedmethods in effect
  658.  */
  659.  
  660.  
  661. /*
  662.  * -- Typedefs for FW_OMemoryRunWriter Method Procedures
  663.  */
  664. SOMEXTERN {
  665. typedef FW_OMemoryRunWriter*   (* SOMLINK somTD_FW_OMemoryRunWriter_Initialize)(FW_OMemoryRunWriter *somSelf, Environment *ev,
  666.         corbastring buffer,
  667.         FW_ByteCount capacity);
  668. }
  669.  
  670. #endif /* FW_OMemoryRunWriter_API */
  671.  
  672.  
  673. /*
  674.  * -- This emitter treats Method Tokens as Thunks by default.
  675.  * -- Use the sc modifier "nothunks" to change this default
  676.  */
  677. #undef somresolve_
  678. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  679.  
  680. /*
  681.  * -- The C++ Wrapper Class for FW_OMemoryRunWriter
  682.  */
  683. class FW_OMemoryRunWriter : public FW_OTextRunWriter
  684. {
  685. public:
  686.  
  687. // FW_OMemoryRunWriter::new registers use of the class object, and then uses somNew
  688. // to allocate memory and load the object method table pointer. 
  689. void *operator new(size_t size)
  690. {
  691.     SOM_IgnoreWarning(size);
  692.     // Allocate memory using the default allocator for FW_OMemoryRunWriter, and
  693.     // clear mem & set method table pointer, call basic initialization
  694. #ifdef SOMCHKNULL
  695.     void * __somResult = (void *)
  696.       somNewObject(FW_OMemoryRunWriter);
  697.     SOMCHKNULL(__somResult);
  698.     return __somResult;
  699. #else
  700.     return (void*) somNewObject(FW_OMemoryRunWriter);
  701. #endif
  702. }
  703.  
  704. // FW_OMemoryRunWriter::delete uses the default deallocator for the object's class.
  705. void operator delete(void * obj)
  706. {
  707.     if (obj) {
  708.         SOM_Resolve(obj,SOMObject,somFree)
  709.            ( (SOMObject*) obj );
  710.     }
  711. }
  712.  
  713. /* method: Initialize */
  714. FW_OMemoryRunWriter*   Initialize(Environment *ev,
  715.         corbastring buffer,
  716.         FW_ByteCount capacity)
  717. {
  718.    #ifdef SOMCHKEXCEPT
  719.    FW_OMemoryRunWriter* __somResult = 
  720.       SOM_ResolveD(this,FW_OMemoryRunWriter,FW_OMemoryRunWriter,Initialize)
  721.     (this,ev,buffer,capacity);
  722.       SOMCHKEXCEPT;
  723.    return __somResult;
  724. #else
  725.    return SOM_ResolveD(this,FW_OMemoryRunWriter,FW_OMemoryRunWriter,Initialize)
  726.     (this,ev,buffer,capacity);
  727. #endif
  728. }
  729.  
  730. };   /* FW_OMemoryRunWriter */
  731.  
  732.  
  733.  
  734. #endif       /* SOM_FW_OMemoryRunWriter_xh */
  735.